<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="UTF-8" />
    <title>Reorder - Interactive</title>
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
    />
    <link href="../../../../../css/core.css" rel="stylesheet" />
    <link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
    <script src="../../../../../scripts/testing/scripts.js"></script>
    <script nomodule src="../../../../../dist/ionic/ionic.js"></script>
    <script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
  </head>

  <body>
    <ion-reorder-group disabled="false">
      <ion-item>
        <ion-label>Item 1</ion-label>
        <ion-reorder slot="end"></ion-reorder>
      </ion-item>
      <ion-reorder>
        <ion-item>
          <ion-label>Item 2</ion-label>
        </ion-item>
      </ion-reorder>
      <ion-item>
        <ion-label>Item 3</ion-label>
        <ion-reorder slot="end"></ion-reorder>
      </ion-item>
      <ion-reorder>
        <ion-item>
          <ion-label>Item 4</ion-label>
        </ion-item>
      </ion-reorder>
    </ion-reorder-group>
    <script>
      const group = document.querySelector('ion-reorder-group');
      group.addEventListener('ionItemReorder', (ev) => {
        ev.detail.complete();
        window.dispatchEvent(new CustomEvent('ionItemReorderComplete'));
      });
    </script>
  </body>
</html>
